﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex, nofollow" />
	<style type="text/css">
	.ReList { border: #dcdcdc 2px solid; background-color: #FFF; overflow: auto; width: 93%; }
	.ReList ul { padding:0; margin:0; list-style:none; }
	.ReList li { margin: 5px; padding: 7px; border: EEE 1px solid; }
	.ReList li h6 { font-size: 11px; padding:0; margin:0; }
	.ReList li div { display:none; }
	</style>
	<script src="common/fck_dialog_common.js" type="text/javascript"></script>
	<script type="text/javascript">

var oEditor		= window.parent.InnerDialogLoaded() ;
var FCK			= oEditor.FCK ;
var FCKLang		= oEditor.FCKLang ;
var FCKConfig	= oEditor.FCKConfig ;

window.onload = function()
{
	GetE('eList').style.height = document.all ? '100%' : '295px' ;

	oEditor.FCKLanguageManager.TranslatePage(document) ;

	window.parent.SetAutoSize( true ) ;

	LoadRestore() ;
}

function LoadRestore()
{
	var oRestore ;

	GetE('eLoading').style.display = '' ;
	var vRes = LoadUrl( FCKConfig.RestoreList );
	if( vRes.length == 0) {
		GetE('eEmpty').style.display = '' ;
	} else {
		GetE('eList').innerHTML = vRes ;
	}
}

function Item_OnMoOve(elm) { elm.className = 'PopupSelectionBox' ; }
function Item_OnMoOut(elm) { elm.className = ''; }
function Item_OnClick(idx) {
	oEditor.FCKUndo.SaveUndoStep() ;
	FCK.SetData( GetE('idx_'+idx).innerHTML ) ;

	window.parent.Cancel( true ) ;
}

	</script>
</head>
<body style="overflow: hidden">
	<table width="100%" style="height: 100%">
		<tr>
			<td align="center">
				<span fcklang="DlgTemplatesSelMsg">Please select the template to open in the editor<br />
					(the actual contents will be lost):</span>
			</td>
		</tr>
		<tr>
			<td height="100%" align="center">
				<div id="eList" align="left" class="ReList">
					<div id="eLoading" align="center" style="display: none">
						<br />
						<span fcklang="DlgTemplatesLoading">Loading templates list. Please wait...</span>
					</div>
					<div id="eEmpty" align="center" style="display: none">
						<br />
						<span fcklang="DlgTemplatesNoTpl">(No templates defined)</span>
					</div>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>
